package Daos;



import Model.Inscricao;
import Model.Usuario;
import Model.UsuarioExterno;
import java.util.List;

public class InscricaoDao extends Dao<Inscricao> {

    public InscricaoDao() {
        super(Inscricao.class);
    }
    
    public List<Inscricao> listByUsuario(UsuarioExterno user) {
        return em.createQuery("SELECT e FROM " + Inscricao.class.getSimpleName() + " e  WHERE e.usuario.cpf = \""+user.getCpf()+ "\"").getResultList();
    }
    
}
